#pragma once


/*/////////////////////

	IOCTLS REG


*//////////////////////

#define HOOK_REG_BORRAR_LLAVE \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x902,METHOD_NEITHER,FILE_ANY_ACCESS)

#define HOOK_REG_BORRAR_VALORES \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x903,METHOD_NEITHER,FILE_ANY_ACCESS)

#define HOOK_REG_INTRODUCIR_VALORES \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x904,METHOD_NEITHER,FILE_ANY_ACCESS)

#define HOOK_REG_VER_VALORES \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x905,METHOD_NEITHER,FILE_ANY_ACCESS)

#define HOOK_REG_ESCONDER \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x916,METHOD_NEITHER,FILE_ANY_ACCESS)


#define KERNEL_REG_MON \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x934,METHOD_NEITHER,FILE_ANY_ACCESS)

#define GET_REG_VALUE_INFORMATION \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x935,METHOD_NEITHER,FILE_ANY_ACCESS)

/*/////////////////////

	IOCTLS PROC


*//////////////////////

#define DESHACER_HOOKS_REGISTRO CTL_CODE(FILE_DEVICE_UNKNOWN,0x906,METHOD_NEITHER,FILE_ANY_ACCESS)
#define HOOK_PROT_PROCESO CTL_CODE(FILE_DEVICE_UNKNOWN,0x907,METHOD_NEITHER,FILE_ANY_ACCESS)
#define DESHACER_PROT_PROCESO CTL_CODE(FILE_DEVICE_UNKNOWN,0x908,METHOD_NEITHER,FILE_ANY_ACCESS)
#define HOOK_BORRAR_DRIVER CTL_CODE(FILE_DEVICE_UNKNOWN,0x909,METHOD_NEITHER,FILE_ANY_ACCESS)
#define HOOK_BORRAR_CARPETA CTL_CODE(FILE_DEVICE_UNKNOWN,0x910,METHOD_NEITHER,FILE_ANY_ACCESS)
#define DESHACER_HOOKS_DIR CTL_CODE(FILE_DEVICE_UNKNOWN,0x911,METHOD_NEITHER,FILE_ANY_ACCESS)
#define RECIBIR_BUFFER_KERNEL CTL_CODE(FILE_DEVICE_UNKNOWN,0x915,METHOD_NEITHER,FILE_ANY_ACCESS)
#define HOOK_ACCESO_DIR CTL_CODE(FILE_DEVICE_UNKNOWN,0x917, METHOD_NEITHER,FILE_ANY_ACCESS)
#define HOOK_ACCESO_DEVICE CTL_CODE(FILE_DEVICE_UNKNOWN,0x918, METHOD_NEITHER,FILE_ANY_ACCESS)
#define HOOK_LECTURA_ESCRITURA CTL_CODE(FILE_DEVICE_UNKNOWN,0x919,METHOD_NEITHER,FILE_ANY_ACCESS)
#define DESHACER_HOOK_LECTURA_ESCRITURA CTL_CODE(FILE_DEVICE_UNKNOWN,0x920,METHOD_NEITHER,FILE_ANY_ACCESS)
#define QUITAR_OFFSET_LIST_ENTRY CTL_CODE(FILE_DEVICE_UNKNOWN,0x921,METHOD_NEITHER,FILE_ANY_ACCESS)
#define HOOK_OPEN_DEVICES CTL_CODE(FILE_DEVICE_UNKNOWN,0x922,METHOD_NEITHER,FILE_ANY_ACCESS)
#define DESHACER_HOOK_OBJETOS CTL_CODE(FILE_DEVICE_UNKNOWN,0x923,METHOD_NEITHER,FILE_ANY_ACCESS) 
#define HOOK_LINK_SIMBOLICO CTL_CODE(FILE_DEVICE_UNKNOWN,0x924,METHOD_NEITHER,FILE_ANY_ACCESS)


// NTFS SCANNER

#define NTFS_SCANNER \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x925,METHOD_NEITHER,FILE_ANY_ACCESS)

// VOL INFO

#define VOLUME_INFORMATION \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x926,METHOD_NEITHER,FILE_ANY_ACCESS)

// ENUM DRIVERS

#define ENUM_DRIVERS_KERNEL \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x927,METHOD_NEITHER,FILE_ANY_ACCESS)

// IRP TEST

#define BORRAR_VIA_IRP \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x928,METHOD_NEITHER,FILE_ANY_ACCESS)

// PROCESS

#define SUSPENDER_PROCESO \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x929,METHOD_NEITHER,FILE_ANY_ACCESS)

#define RESUMIR_PROCESO \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x930,METHOD_NEITHER,FILE_ANY_ACCESS)

#define TERMINAR_PROCESO \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x931,METHOD_NEITHER,FILE_ANY_ACCESS)

#define MEMORY_INFORMATION \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x932,METHOD_NEITHER,FILE_ANY_ACCESS)

#define KERNEL_PROCESS_EXPLORER \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x933,METHOD_NEITHER,FILE_ANY_ACCESS)

#define KERNEL_OBJECT_MANAGER \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x936,METHOD_NEITHER,FILE_ANY_ACCESS)	


#define KERNEL_DRIVER_LIST \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x937,METHOD_NEITHER,FILE_ANY_ACCESS)	

#define GET_KERNEL_FILE_INFORMATION \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x938,METHOD_NEITHER,FILE_ANY_ACCESS)	


#define TERMINATE_PROCESS_INTERNALLY \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x939,METHOD_NEITHER,FILE_ANY_ACCESS)	

#define HIDE_FILE \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x940,METHOD_NEITHER,FILE_ANY_ACCESS)	

// HILOS

#define THREAD_KERNEL_INFORMATION \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x941,METHOD_NEITHER,FILE_ANY_ACCESS)

#define THREAD_KILL_KERNEL \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x942,METHOD_NEITHER,FILE_ANY_ACCESS)
// DRIVER

#define UNLOAD_DRIVER \
	CTL_CODE(FILE_DEVICE_UNKNOWN,0x943,METHOD_NEITHER,FILE_ANY_ACCESS)


#define KERNEL_DISPOSITIVO L"\\Device\\KEMM"

extern HANDLE g_device;
extern IO_STATUS_BLOCK io;


namespace KERNEL
{
	
	NTSTATUS AbrirCanalComunicacion(IN PWSTR NombreDispositivo);
	NTSTATUS CerrarCanalComunicacion(VOID);
};